package com.cjm.one.controller.goods;

import com.cjm.one.common.result.Result;
import com.cjm.one.model.goods.vo.GoodsInfoVo;
import com.cjm.one.service.GoodsInfoService;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/goods/info")
public class GoodsInfoController {
    @Resource
    private GoodsInfoService goodsInfoService;

    @GetMapping
    @Operation(summary = "获取商品详情")
    public Result<GoodsInfoVo> getByIdInfo(@RequestParam("id") Long id){

        return  goodsInfoService.getById(id);
    }
}
